<div class="oAuthLinks">
  <%- if devise_mapping.omniauthable? and request.base_url != 'http://0.0.0.0:3000' %>
    <%- resource_class.omniauth_providers.each do |provider| %>
      <% if provider.to_s == "google_oauth2" && (current_page?(new_user_session_path) || current_page?(new_user_password_path)) %>
        <div class="smallMarginTop">
          <%= react_component 'OAuthButton', props: {
            type: 'google',
            signIn: true,
            action: omniauth_authorize_path(resource_name, provider),
            token: form_authenticity_token
          } %>
        </div>
      <% elsif provider.to_s == "google_oauth2" %>
        <div class="smallMarginTop">
          <%= react_component 'OAuthButton', props: {
            type: 'google',
            signIn: false,
            action: omniauth_authorize_path(resource_name, provider),
            token: form_authenticity_token
          } %>
        </div>
      <% end -%>

      <% if provider.to_s == "facebook" && (current_page?(new_user_session_path) || current_page?(new_user_password_path)) %>
        <div class="smallMarginTop">
          <%= react_component 'OAuthButton', props: {
            type: 'facebook',
            signIn: true,
            action: omniauth_authorize_path(resource_name, provider),
            token: form_authenticity_token
          } %>
        </div>
      <% elsif provider.to_s == "facebook" %>
        <div class="smallMarginTop">
          <%= react_component 'OAuthButton', props: {
            type: 'facebook',
            signIn: false,
            action: omniauth_authorize_path(resource_name, provider),
            token: form_authenticity_token
          } %>
        </div>
      <% end -%>
    <% end -%>
  <% end -%>

  <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
    <div class="smallMarginTop">
      <%= link_to t('account.forgot_password'), new_password_path(resource_name) %>
    </div>
  <% end -%>

  <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
    <div class="smallMarginTop">
      <%= link_to t('devise.shared.confirmation'), new_confirmation_path(resource_name) %>
    </div>
  <% end -%>

  <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
    <div class="smallMarginTop">
      <%= link_to t('devise.shared.unlock'), new_unlock_path(resource_name) %>
    </div>
  <% end -%>
</div>
